<script setup lang='ts'>
import { BASE_URL } from "@/api";
import { WangEditor } from "@/components/Editor/index"

const imgUploadConfig = {
  name: 'file',
  url: '/common/upload',
  customInsert: (res: any, insertFn: any) => {
    console.log(res);

    const url = BASE_URL + '/files' + '/' + res.data.url
    const alt = ''
    const href = ''
    insertFn(url, alt, href)
  }
}


</script>
<template>
  <WangEditor :imgUploadConfig="imgUploadConfig" />
</template>

<style lang='less' scoped></style>